using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using System.Net.Sockets;
using System.Net;
using System.Net.Sockets;

namespace tcp_server
{
    class Program
    {
        static void Main(string[] args)
        {
            TcpListener listener = new TcpListener(9999);
            listener.Start();
            TcpClient client = listener.AcceptTcpClient(); NetworkStream ns = client.GetStream();
            byte[] byteTime = Encoding.ASCII.GetBytes(DateTime.Now.ToString());
            ns.Write(byteTime, 0, byteTime.Length);
            ns.Close();
            client.Close();

        }
    }
    
}
